unit Unitswdk;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, CoolTrayIcon, Menus,ushare, StdCtrls,datamUnit,DBAccess,UniDacVcl;

type
  TForm1 = class(TForm)
    CoolTrayIcon1: TCoolTrayIcon;
    pm1: TPopupMenu;
    N1: TMenuItem;
    N2: TMenuItem;
    procedure N1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure N2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.N1Click(Sender: TObject);
begin
close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
//DataM.UniConnection2.LoginPrompt:=true;
//DataM.UniConnection2.Open;
TUniConnectDialogUtils.SaveDatabaseListToRegistry(nil);
injectkp('codecore.dll');

end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
uninjectkp('codecore.dll');
end;

procedure TForm1.N2Click(Sender: TObject);
begin

TUniConnectDialogUtils.SaveDatabaseListToRegistry(nil);
DataM.UniConnection2.LoginPrompt:=true;
DataM.UniConnection2.Open;

end;

end.
